﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace cnFederal.Fa_Forms
{
    public partial class NationalityContents : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string language = Request.QueryString["Language"];
            string query = Request.QueryString["NationId"];
           
            if (!string.IsNullOrWhiteSpace(query))
            {
                Nations.Load(language);
                listview1.DataSource = Nations.GetFaPostsByNationAndLanguage(Convert.ToInt32(query),language,true);
                listview1.DataBind();
            }
        }

        public string GetShortDate(string datetime)
        {
            return Convert.ToDateTime(datetime).ToShortDateString();
        }
        protected void pager_click(object sender, EventArgs e)
        {
            int lastpage = this.DataPager1.StartRowIndex;
            DataPager1.SetPageProperties(lastpage, DataPager1.MaximumRows, false);

            listview1.DataBind();

        }
    }
}